﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FbKPI.Model;
using FbKPI.Controller;

namespace FbKPI.Facade
{
    public class KPIAssignFacade
    {
        public string Save(KPIAssign KPIs)
        {
            KPIAssignController cont = new KPIAssignController();
            return cont.Save(KPIs);
        }

        public bool SaveWithList(List<KPIAssign> list)
        {
            KPIAssignController cont = new KPIAssignController();
            return cont.SaveWithList(list);
        }

        public bool DeleteWithList(List<KPIAssign> list)
        {
            KPIAssignController cont = new KPIAssignController();
            return cont.DeleteWithList(list);
        }

        public string Delete(KPIAssign KPIs)
        {
            KPIAssignController cont = new KPIAssignController();
            return cont.Delete(KPIs);
        }

        public IList<KPIAssign> GetAll(string sSearch, int PageNumber, int DataLength, string SortCol, string SortDirection, out int TotalData, Employee User)
        {
            IList<KPIAssign> KPIs = new List<KPIAssign>();
            KPIAssignController cont = new KPIAssignController();
            KPIs = cont.GetAll(sSearch, PageNumber, DataLength, SortCol, SortDirection, out TotalData, User);
            return KPIs;
        }

        public IList<KPIAssign> GetAllKPIAssignsByKPIID(string sSearch, int KPIID, int PageNumber, int DataLength, string SortCol, string SortDirection, out int TotalData)
        {
            IList<KPIAssign> KPIs = new List<KPIAssign>();
            KPIAssignController cont = new KPIAssignController();
            KPIs = cont.GetAllKPIAssignsByKPIID(sSearch, KPIID, PageNumber, DataLength, SortCol, SortDirection, out TotalData);
            return KPIs;
        }

        public IList<KPIAssign> GetAllKPIAssignsByKPIID(int KPIID)
        {
            IList<KPIAssign> KPIs = new List<KPIAssign>();
            KPIAssignController cont = new KPIAssignController();
            KPIs = cont.GetAllKPIAssignsByKPIID(KPIID);
            return KPIs;
        }


        public KPIAssign GetKPIAssignsByKPIID(int KPIID)
        {
            KPIAssign KPIs = new KPIAssign();
            KPIAssignController cont = new KPIAssignController();
            KPIs = cont.GetByKPIID(KPIID);
            return KPIs;
        }


        public KPIAssign GetKPIAssignByID(int ID)
        {
            KPIAssign KPIs = new KPIAssign();
            KPIAssignController cont = new KPIAssignController();
            KPIs = cont.GetKPIAssignByID(ID);
            return KPIs;
        }
    }
}